Hi,
I want to display object text which is in italic style. How can we do this? Could you please help me in resolving this problem. I want to display all the objects that are containing italic text only. Example: Obj1: normal text Obj2: Italic text (all the characters in this object are in italic) Obj3: normal text Obj4: Italic text ( The entire text in this object is in Italic style)
Now i want to display only Obj2 and Obj4 only
Please help me.
Thanks, Naidu.
I wat DXLAdimn - Mon May 29 03:22:16 EDT 2017 |
Re: Layout dxl for displaying object text that is in italic style Hello, Do a function like this:
bool is_entire_italic_text(string rich_text) {
RichText rt
bool b_italic= true
if (rich_text == "") b_italic= false
for rt in rich_text do {
if(! rt.isOle) { //avoid OLEs
if (! rt.italic) {
b_italic = false
break
}
}
}
return b_italic
}
And call it like this:
for an_object in a_module do {
if ( is_entire_italic_text(richTextNoOle(an_object."Object Text")) ) {
//what you have to do
}
}
You can create similar functions like this one for each other RTF boolean property: bold, strikethru, underline.
-Christophe- |
Re: Layout dxl for displaying object text that is in italic style ChristopheP - Mon May 29 04:50:56 EDT 2017 Hello, Do a function like this:
bool is_entire_italic_text(string rich_text) {
RichText rt
bool b_italic= true
if (rich_text == "") b_italic= false
for rt in rich_text do {
if(! rt.isOle) { //avoid OLEs
if (! rt.italic) {
b_italic = false
break
}
}
}
return b_italic
}
And call it like this:
for an_object in a_module do {
if ( is_entire_italic_text(richTextNoOle(an_object."Object Text")) ) {
//what you have to do
}
}
You can create similar functions like this one for each other RTF boolean property: bold, strikethru, underline.
-Christophe- Hi Christophe, Thanks for the solutions but i want to display all those objects which are containing italic text like filter. I have tried the below code as you have mentioned but i am not getting any result. Please elaborate the steps clearly.
bool is_entire_italic_text(string rich_text) {
for rt in rich_text do {
Thanks, Naidu
|
Re: Layout dxl for displaying object text that is in italic style Sorry Naiduk, I understand my answer was not complete. Then, what you have to do after is a Filter, and apply it to your current module. I am not very experienced with DXL filtering but I will try to give you a bunch of code ASAP.
|